package com.xc.hotelmgr.order.modules.order.service.impl;

import com.xc.hotelmgr.order.common.utils.Query;
import org.springframework.stereotype.Service;

import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.hotelmgr.order.common.utils.PageUtils;

import com.xc.hotelmgr.order.modules.order.dao.DtStoreDao;
import com.xc.hotelmgr.order.modules.order.entity.DtStoreEntity;
import com.xc.hotelmgr.order.modules.order.service.DtStoreService;


@Service("dtStoreService")
public class DtStoreServiceImpl extends ServiceImpl<DtStoreDao, DtStoreEntity> implements DtStoreService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<DtStoreEntity> page = this.page(
                new Query<DtStoreEntity>().getPage(params),
                new QueryWrapper<DtStoreEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public DtStoreEntity sqlSelectByOrderId(Long orderId) {
        return  baseMapper.sqlSelectByOrderId(orderId);
    }

    @Override
    public DtStoreEntity sqlSelectByUserName(String userName) {
       return baseMapper.sqlSelectByUserName(userName);
    }

}